<?phpclass Newsmiddle_Model {	public $con;	public function __construct(){		$this->con =  mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);		if(mysqli_connect_error())		{			echo "Failed to connect to MySQL". mysqli_connect_error();exit();		}		}    public function getListCate() {        $query = "SELECT c.id,c.nameCat,c.description FROM catnews AS c";        $result = mysqli_query($this->con,$query);        return $result;    }    public function getListsPro() {        $query = "SELECT * FROM news ";        $result = mysqli_query($this->con,$query);        //var_dump($result); exit();        return $result;    }}?>